package com.stylefeng.guns.modular.system.dao;

import com.stylefeng.guns.modular.system.model.VpnChannelActionInfo;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.stylefeng.guns.modular.vpn.dto.ChannelActionDTO;
import com.stylefeng.guns.modular.vpn.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author godrui
 * @since 2020-06-05
 */
public interface VpnChannelActionInfoMapper extends BaseMapper<VpnChannelActionInfo> {
    List<ChannelActionDO> getChannelActionData(@Param("channelNoArr") List<String> channelNoArr,
                                               @Param("beginTime") String beginTime,
                                               @Param("endTime") String endTime);
    Integer allCount(@Param("beginTime") String beginTime,
                     @Param("endTime") String endTime);

    List<ChannelActionDO> listAll(@Param("channelNoArr") List<String> channelNoArr,
                                  @Param("beginTime") String beginTime,
                                  @Param("endTime") String endTime);

    /**
     * 查询渠道每日注册信息
     * @param channelNoArr
     * @param options
     * @return
     */
    List<ChannelActionInfoOfDailyDO> findChannelRegistrationOfDaily(@Param("channelNoArr") List<String> channelNoArr,
                                                      @Param("options") String options);

    /**
     * 查询渠道每日各个事件的信息
     * @param channelNoArr
     * @param options
     * @return
     */
    List<ChannelActionInfoOfDailyDO> findChannelActionInfoOfDaily(@Param("channelNoArr") List<String> channelNoArr,
                                 @Param("options") String options);


    /**
     * 查询渠道行为动作数量
     * @param channelNoArr
     * @param options
     * @return
     */
    ChannelActionCountDO getChannelActionCount(@Param("channelNoArr") List<String> channelNoArr,
                                     @Param("options") String options);

    /**
     * 查询渠道购买人数
     * @param channelNoArr
     * @param options
     * @return
     */
    Integer getPaymentCount(@Param("channelNoArr") List<String> channelNoArr,
                                           @Param("options") String options);

    /**
     * 查询渠道注册数量
     * @param channelNoArr
     * @param options
     * @return
     */
    Integer getRegisterCount(@Param("channelNoArr") List<String> channelNoArr,
                                           @Param("options") String options);

    /**
     * 筛选条件 - 渠道名称（渠道名称，渠道号）
     * @return
     */
    List<ChannelNameDO> getChannelNames();
}
